using Cysharp.Threading.Tasks;
using IQIGame.Onigao.Game;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay
{
    public class MainCityDropItemPlay : DropItemPlay
    {
        protected MainCityRegionCtrl regionCtrl => MainCityModule.Instance.mainController.regionCtrl;
        public override Transform dropHolder => regionCtrl.effectCtrl.effectRoot;
        public override TViewEntity playerAvatarEntity => regionCtrl.entityCtrl.playerAvatarEntity;

        public override void HideDrop(Entity entity)
        {
            regionCtrl.effectCtrl.HideEffect(entity);
        }

        public override UniTask<Entity> ShowDrop(int itemCid, bool isLightBeam, Vector3 position)
        {
            return regionCtrl.effectCtrl.ShowEffect(dropHolder, GameScenePlayUtil.GetDropEffectPathByItem(itemCid, isLightBeam), position);
        }
    }
}
